<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ taglib uri="http://www.ld.com/jsp/plugin" prefix="plugin"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<%-- 权限判断 --%>
<shield:permssion type="button">
<div class="show-info">
	<!-- validate表示验证容器，data-position表示提示显示方式  class="validate" data-position="right_out" -->
	<form action="${ctxPathA}/system/user/addOrUpdate" method="post" autocomplete="off" >
		<shield:token/>
	    <input id="id" name="id" type="hidden" maxlength="100" value="${model.id }">
	    <table class="tab-show">
	    	<colgroup>
	    		<col width="150">
	    		<col width="">
	    	</colgroup>
	<!-- 添加 -->
	<c:if test="${empty model.id }">
	        <tr>
		    	<th>
	            	<label><font color="red">*</font>登录账号：</label>
	        	</th>
	         	<td><input type="text" name="loginCode" ></td>
		    	<th>
	            	<label><font color="red">*</font>用户密码：</label>
	        	</th>
	         	<td><input type="password" name="password" value=""  maxlength="20" rangelength='8,20'></td>
			</tr>
	</c:if>
	<!-- 修改 -->
	<c:if test="${not empty model.id }">
			<tr>
		    	<th>
	            	<label>登录账号：</label>
	        	</th>
	         	<td colspan="3">${model.loginCode}</td>
			</tr>
	</c:if>
	        <tr>
		    	<th>
	            	<label><font color="red">*</font>用户姓名：</label>
	        	</th>
	         	<td><input type="text" name="userName" value="${model.userName}" ></td>
		    	<th>
	            	<label><font color="red">*</font>电子邮箱：</label>
	        	</th>
	         	<td><input type="text" class="email" name="email" value="${model.email}" ></td>
			</tr>
	        <tr>
		    	<th>
	            	<label><font color="red">*</font>手机号码：</label>
	        	</th>
	         	<td><input type="text" class="mphone" name="mobile" value="${model.mobile}" ></td>
		    	<th>
	            	<label>办公电话：</label>
	        	</th>
	         	<td><input type="text" name="phone" value="${model.phone}" ></td>
			</tr>
	        <tr>
		    	<th>
	            	<label>头像：</label>
	        	</th>
	         	<td colspan="3">
	         	
	         	 <plugin:images name="avatar" imgSource="${model.avatar}" multi="false" ></plugin:images>
	         	</td>
			</tr>
	        <tr>
		    	<th>
	            	<label>用户性别：</label>
	        	</th>
	         	<td>
	         		<!-- data-v 表示当前的值 -->
	         		<select name="sex" data-v="${model.sex}">
	         			<option value="0">女</option>
	         			<option value="1">男</option>
	         		</select>
	         	</td>
		    	<th>
	            	<label>微信号：</label>
	        	</th>
	         	<td><input type="text" name="wxOpenid" value="${model.wxOpenid}" ></td>
			</tr>
	        <tr>
		    	<th>
	            	<label>个性签名：</label>
	        	</th>
	         	<td colspan="3"><input type="text" name="sign" value="${model.sign}" ></td>
			</tr>
	        <%-- <tr>
		    	<th>
	            	<label>绑定的手机串号：</label>
	        	</th>
	         	<td><input type="text" name="mobileImei" value="${model.mobileImei}" ></td>
			</tr> --%>
			<tr>
		    	<th>
	            	<label>入职时间：</label>
	        	</th>
	         	<td><input type="text" name="entryDate" value="<fmt:formatDate pattern="yyyy-MM-dd" value="${model.entryDate}"/>" class="Wdate"></td>
		    	<th>
	            	<label>离职时间：</label>
	        	</th>
	         	<td><input type="text" name="exitDate" value="<fmt:formatDate pattern="yyyy-MM-dd" value="${model.exitDate}"/>" class="Wdate"></td>
			</tr>
	       <%--  <tr>
		    	<td>
	            	<label>用户类型：</label>
	        	</td>
	         	<td><input type="text" name="userType" value="${model.userType}"></td>
			<tr>
	        <tr>
		    	<td>
	            	<label>用户类型引用编号：</label>
	        	</td>
	         	<td><input type="text" name="refCode" value="${model.refCode}"></td>
			<tr>
	        <tr>
		    	<td>
	            	<label>用户类型引用姓名：</label>
	        	</td>
	         	<td><input type="text" name="refName" value="${model.refName}"></td>
			<tr>
	        <tr>
		    	<td>
	            	<label>管理员类型：</label>
	        	</td>
	         	<td>
	         		<select name="mgrType" data-v="${model.mgrType}">
	         			<option value="0">非管理员 </option>
	         			<option value="1">系统管理员 </option>
	         			<option value="2">二级管理员 </option>
	         		</select>
	         	</td>
			<tr> --%>
	<c:if test="${not empty model.id }">
	        <%-- <tr>
		    	<th>
	            	<label>密码安全级别：</label>
	        	</th>
	         	<td><input class="w100" type="text" name="pwdSecurityLevel" value="${model.pwdSecurityLevel}"><span class="red">（0初始 1很弱 2弱 3安全 4很安全）</span></td>
			</tr> --%>
			<tr>
		    	<th>
	            	<label>密码最后更新时间：</label>
	        	</th>
	         	<td class="shieldDatetime" colspan="3">${model.pwdUpdateTime}</td>
			</tr>
	        <tr>
		    	<th>
	            	<label>密码修改记录：</label>
	        	</th>
	         	<td colspan="3"><input type="text" name="pwdUpdateRecord" value="${model.pwdUpdateRecord}" ></td>
			</tr>
	        <%-- <tr>
		    	<td>
	            	<label>密保问题：</label>
	        	</td>
	         	<td><input type="text" name="pwdQuestion" value="${model.pwdQuestion}"></td>
			<tr>
	        <tr>
		    	<td>
	            	<label>密保问题答案：</label>
	        	</td>
	         	<td><input type="text" name="pwdQuestionAnswer" value="${model.pwdQuestionAnswer}"></td>
			<tr>
	        <tr>
		    	<td>
	            	<label>密保问题2：</label>
	        	</td>
	         	<td><input type="text" name="pwdQuestion2" value="${model.pwdQuestion2}"></td>
			<tr>
	        <tr>
		    	<td>
	            	<label>密保问题答案2：</label>
	        	</td>
	         	<td><input type="text" name="pwdQuestionAnswer2" value="${model.pwdQuestionAnswer2}"></td>
			<tr>
	        <tr>
		    	<td>
	            	<label>密保问题3：</label>
	        	</td>
	         	<td><input type="text" name="pwdQuestion3" value="${model.pwdQuestion3}"></td>
			<tr>
	        <tr>
		    	<td>
	            	<label>密保问题答案3：</label>
	        	</td>
	         	<td><input type="text" name="pwdQuestionAnswer3" value="${model.pwdQuestionAnswer3}"></td>
			<tr>
			<tr>
		    	<td>
	            	<label>密码问题修改时间：</label>
	        	</td>
	         	<td>${model.pwdQuestUpdateTime}</td>
			<tr> --%>
	        <tr>
		    	<th>
	            	<label>最后登陆IP：</label>
	        	</th>
	         	<td>${model.lastLoginIp}</td>
		    	<th>
	            	<label>最后登陆时间：</label>
	        	</th>
	         	<td class="shieldDatetime">${model.lastLoginTime}</td>
			</tr>
	<!-- 冻结 -->
	<c:if test="${model.state == 3 }">
			<tr>
		    	<th>
	            	<label>冻结时间：</label>
	        	</th>
	         	<td class="shieldDatetime" colspan="1">${model.freezeTime}</td>
			</tr>
	        <tr>
		    	<th>
	            	<label>冻结原因：</label>
	        	</th>
	         	<td colspan="3">${model.freezeCause}</td>
			</tr>
	</c:if>
	        <%-- <tr>
		    	<td>
	            	<label>用户权重（降序）：</label>
	        	</td>
	         	<td><input type="text" name="userWeight" value="${model.userWeight}"></td>
			<tr> --%>
	</c:if>
	        <tr>
		    	<th>
	            	<label>备注信息：</label>
	        	</th>
	         	<td colspan="3"><input type="text" name="remarks" value="${model.remarks}"></td>
			</tr>
	        <tr>
		    	<th>
	            	<label>状态：</label>
	        	</th>
	         	<td colspan="3"><shield:switchOput data="-1=删除|2=停用|3=冻结|正常" value="${model.state}"></shield:switchOput></td>
			</tr>
	    </table>
	    <div class="taCenter">
			<input class="button" type="submit" value="提交"/>
	    	<input class="button default" type="reset" value="重置"/>
	    </div>
	</form>
</div>
</shield:permssion>